package com.doudou.collection.domain.service.admin.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.doudou.collection.dao.mapper.admin.SysUserMapper;
import com.doudou.collection.domain.service.admin.SysUserService;
import com.doudou.collection.orm.entity.admin.SysUser;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @ClassName SysUserServiceImpl<br>
 * @Description TODO<br>
 * @Author 李浩文<br>
 * @Date 2023/6/27 15:45<br>
 * @Version 1.0<br>
 */
@Slf4j
@Service
public class SysUserServiceImpl implements SysUserService {

    @Autowired
    private SysUserMapper sysUserMapper;

    @Override
    public SysUser getByUsername(String username) {
        log.debug("正在处理【获取用户信息】的请求，参数：{}", username);
        QueryWrapper<SysUser> qw = new QueryWrapper<>();
        qw.eq("username", username);
        return sysUserMapper.selectOne(qw);
    }
}
